package com.cqs.learning.spring.cloud.producer.bean.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;
import java.time.LocalDateTime;


/**
 * @Author lixw
 * @Date 6/2/20 12:12 AM
 */
@Data
public class HousePrice {

    @TableId
    private Long id;

    /**
     * A reference number which is generated automatically recording each published sale. The number is unique and will change each time a sale is recorded.
     */
    private String tui;

    /**
     * Sale price stated on the transfer deed.
     */
    private Double price;

    /**
     * Date when the sale was completed, as stated on the transfer deed.
     */
    private Timestamp transferDate;

    /**
     * This is the postcode used at the time of the original transaction. Note that postcodes can be reallocated and these changes are not reflected in the Price Paid Dataset.
     */
    private String postCode;

    /**
     * D = Detached, S = Semi-Detached, T = Terraced, F = Flats/Maisonettes, O = Other.  Note that i) HM Land Registry only record the above categories to describe property type, they do not separately identify bungalows, ii) end-of-terrace properties are included in the Terraced category, iii) ‘Other’ is only valid where the transaction relates to a property type that is not covered by existing values.
     */
    private String propertyType;

    /**
     * Indicates the age of the property and applies to all price paid transactions, residential and non-residential. Y = a newly built property, N = an established residential building
     */
    private String oldOrNew;

    /**
     * Relates to the tenure: F = Freehold, L= Leasehold etc. Note that HM Land Registry does not record leases of 7 years or less in the Price Paid Dataset.
     */
    private String duration;

    /**
     * Primary Addressable Object Name. Typically the house number or name.
     */
    private String paon;

    /**
     * Secondary Addressable Object Name. Where a property has been divided into separate units (for example, flats), the PAON (above) will identify the building and a SAON will be specified that identifies the separate unit/flat.
     */
    private String saon;

    private String street;

    private String locality;

    private String townOrCity ;

    /**
     * ndicates the type of Price Paid transaction. A = Standard Price Paid entry, includes single residential property sold for value. B = Additional Price Paid entry including transfers under a power of sale/repossessions, buy-to-lets (where they can be identified by a Mortgage) and transfers to non-private individuals. Note that category B does not separately identify the transaction types stated. HM Land Registry has been collecting information on Category A transactions from January 1995. Category B transactions were identified from October 2013.
     */
    private String ppdCategory;
    /**
     * Indicates additions, changes and deletions to the records. A = Addition, C = Change, D = Delete. Note that where a transaction changes category type due to misallocation (as above) it will be deleted from the original category type and added to the correct category with a new transaction unique identifier.
     */
    private String recordStatus;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;


    //交易时间段查询
    @TableField(exist = false)
    private Timestamp transferStart;
    @TableField(exist = false)
    private Timestamp transferEnd;


    @TableField(exist = false)
    private int pageNo;

    @TableField(exist = false)
    private int pageSize;

}
